
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type StoreOrderCartInfoRequest struct {

	Oid string `json:"oid" form:"oid"`

	Uid string `json:"uid" form:"uid"`

	CartId string `json:"cart_id" form:"cart_id"`

	ProductId string `json:"product_id" form:"product_id"`

	OldCartId string `json:"old_cart_id" form:"old_cart_id"`

	CartNum string `json:"cart_num" form:"cart_num"`

	RefundNum string `json:"refund_num" form:"refund_num"`

	SurplusNum string `json:"surplus_num" form:"surplus_num"`

	SplitStatus string `json:"split_status" form:"split_status"`

	CartInfo string `json:"cart_info" form:"cart_info"`

	Unique string `json:"unique" form:"unique"`

}

func (r *StoreOrderCartInfoRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *StoreOrderCartInfoRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"oid": "required",

		"uid": "required",

		"cart_id": "required",

		"product_id": "required",

		"old_cart_id": "required",

		"cart_num": "required",

		"refund_num": "required",

		"surplus_num": "required",

		"split_status": "required",

		"cart_info": "required",

		"unique": "required",

	}
}

func (r *StoreOrderCartInfoRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreOrderCartInfoRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreOrderCartInfoRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
